/* ASCII D2 - main.c
   Bogdan Filipchuk
   */
#include "main.h"



D2_ASCII::D2_ASCII() {
   Surf_Display = NULL;
   running = true;
}

int D2_ASCII::OnExecute() {
   
   if( init() == false ){
      return -1;
   }
   
   SDL_Event e;
   
   while( running ) {
      while( SDL_PollEvent( &e ) ){
         OnEvent( e );
      }
      OnLoop();
      render();
   }

   clean();
   
   return 0;
}

int main(int argc, char* argv[]) {
   D2_ASCII game;
   return game.OnExecute();
}